<%@ page import="com.dbb.entity.Product" %>



<div class="fieldcontain ${hasErrors(bean: productInstance, field: 'ref', 'error')} required">
	<label for="ref">
		<g:message code="product.ref.label" default="Ref" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="ref" required="" value="${productInstance?.ref}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: productInstance, field: 'name', 'error')} required">
	<label for="name">
		<g:message code="product.name.label" default="Name" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="name" required="" value="${productInstance?.name}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: productInstance, field: 'colors', 'error')} ">
	<label for="colors">
		<g:message code="product.colors.label" default="Colors" />
		
	</label>
	<g:select name="colors" from="${com.dbb.entity.Color.list()}" multiple="multiple" optionKey="id" size="5" value="${productInstance?.colors*.id}" class="many-to-many"/>
</div>

<div class="fieldcontain ${hasErrors(bean: productInstance, field: 'comments', 'error')} ">
	<label for="comments">
		<g:message code="product.comments.label" default="Comments" />
		
	</label>
	<g:select name="comments" from="${com.dbb.entity.ProComment.list()}" multiple="multiple" optionKey="id" size="5" value="${productInstance?.comments*.id}" class="many-to-many"/>
</div>

<div class="fieldcontain ${hasErrors(bean: productInstance, field: 'cref', 'error')} ">
	<label for="cref">
		<g:message code="product.cref.label" default="Cref" />
		
	</label>
	<g:textField name="cref" value="${productInstance?.cref}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: productInstance, field: 'customers', 'error')} ">
	<label for="customers">
		<g:message code="product.customers.label" default="Customers" />
		
	</label>
	<g:select name="customers" from="${com.dbb.entity.company.Company.list()}" multiple="multiple" optionKey="id" size="5" value="${productInstance?.customers*.id}" class="many-to-many"/>
</div>

<div class="fieldcontain ${hasErrors(bean: productInstance, field: 'deleted', 'error')} ">
	<label for="deleted">
		<g:message code="product.deleted.label" default="Deleted" />
		
	</label>
	<g:checkBox name="deleted" value="${productInstance?.deleted}" />
</div>

<div class="fieldcontain ${hasErrors(bean: productInstance, field: 'logo', 'error')} required">
	<label for="logo">
		<g:message code="product.logo.label" default="Logo" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="logo" name="logo.id" from="${com.dbb.entity.Photo.list()}" optionKey="id" required="" value="${productInstance?.logo?.id}" class="many-to-one"/>
</div>

<div class="fieldcontain ${hasErrors(bean: productInstance, field: 'nameEn', 'error')} ">
	<label for="nameEn">
		<g:message code="product.nameEn.label" default="Name En" />
		
	</label>
	<g:textField name="nameEn" value="${productInstance?.nameEn}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: productInstance, field: 'pics', 'error')} ">
	<label for="pics">
		<g:message code="product.pics.label" default="Pics" />
		
	</label>
	<g:select name="pics" from="${com.dbb.entity.Photo.list()}" multiple="multiple" optionKey="id" size="5" value="${productInstance?.pics*.id}" class="many-to-many"/>
</div>

<div class="fieldcontain ${hasErrors(bean: productInstance, field: 'priceLogs', 'error')} ">
	<label for="priceLogs">
		<g:message code="product.priceLogs.label" default="Price Logs" />
		
	</label>
	<g:select name="priceLogs" from="${com.dbb.entity.PriceLog.list()}" multiple="multiple" optionKey="id" size="5" value="${productInstance?.priceLogs*.id}" class="many-to-many"/>
</div>

<div class="fieldcontain ${hasErrors(bean: productInstance, field: 'proNum', 'error')} required">
	<label for="proNum">
		<g:message code="product.proNum.label" default="Pro Num" />
		<span class="required-indicator">*</span>
	</label>
	<g:field name="proNum" type="number" value="${productInstance.proNum}" required=""/>
</div>

<div class="fieldcontain ${hasErrors(bean: productInstance, field: 'sizes', 'error')} ">
	<label for="sizes">
		<g:message code="product.sizes.label" default="Sizes" />
		
	</label>
	<g:select name="sizes" from="${com.dbb.entity.Size.list()}" multiple="multiple" optionKey="id" size="5" value="${productInstance?.sizes*.id}" class="many-to-many"/>
</div>

<div class="fieldcontain ${hasErrors(bean: productInstance, field: 'sref', 'error')} ">
	<label for="sref">
		<g:message code="product.sref.label" default="Sref" />
		
	</label>
	<g:textField name="sref" value="${productInstance?.sref}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: productInstance, field: 'status', 'error')} ">
	<label for="status">
		<g:message code="product.status.label" default="Status" />
		
	</label>
	<g:textField name="status" value="${productInstance?.status}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: productInstance, field: 'suppliers', 'error')} ">
	<label for="suppliers">
		<g:message code="product.suppliers.label" default="Suppliers" />
		
	</label>
	<g:select name="suppliers" from="${com.dbb.entity.company.Company.list()}" multiple="multiple" optionKey="id" size="5" value="${productInstance?.suppliers*.id}" class="many-to-many"/>
</div>

<div class="fieldcontain ${hasErrors(bean: productInstance, field: 'tags', 'error')} ">
	<label for="tags">
		<g:message code="product.tags.label" default="Tags" />
		
	</label>
	<g:select name="tags" from="${com.dbb.entity.Tag.list()}" multiple="multiple" optionKey="id" size="5" value="${productInstance?.tags*.id}" class="many-to-many"/>
</div>

